TK!2
=v
#1
:n
a
:v
2160
:s
i
:c
\ integer
#2
:n
b
:v
4536
:s
i
:c
/ numbers
#4
:n
gcd
:v
216
:s
o
:c
greatest common divisor
#5
:n
lcm
:v
45360
:s
o
:c
least common denominator
=u
=l
=f
#1
:n
GCD
:c
Greatest Common Divisor, Euclid's algorithm
:t
Procedure
:i
a,b
:o
z
#2
:n
LCM
:c
Least Common Multiple
:t
Procedure
:i
a,b
:o
z
#1
:n
GCD
:z
if or(int(a)<>a,int(b)<>b) then ERROR:= non-integer_argument
x:= abs(a)
z:= abs(b)
loop: remainder:= mod(x,z)
      if remainder=0 then return
      x:= z
      z:= remainder
      goto loop
/E
E
#2
:n
LCM
:z
z:= a*b/GCD(a,b)
/E
E
=r
#1
:r
"  ***  Greatest Common Divisor and Least Common Multiple  ***
:s
C
#3
:r
gcd = GCD(a,b)
#5
:r
lcm = LCM(a,b)
=p
=t
=n
=g
#1
:c
.000001
:i
10
:v
Yes
:l
60
:f
66
:m
0
:w
80
:b
Yes
:a
Yes
:r
Yes
:h
No
:t
1
:n
Yes
:d
LPT1
%Br,f,0,1,0,1,0
%Ov,f,1,1,0,1,0
